These are from -Wclazy-qstring-ref, and were automatically fixed.
// In 95% of the callers, this could be s1.startsWith(s2)...
inline int case_ignore_strncmp(const QString& s1, const QString& s2, int n)
{
- return s1.left(n).compare(s2.left(n), Qt::CaseInsensitive);
+ return s1.leftRef(n).compare(s2.left(n), Qt::CaseInsensitive);
}
int str_match(const char* str, const char* match);
base = 7680;
}
if (base) {
- n = desc.mid(7).toInt();
+ n = desc.midRef(7).toInt();
return n + base;
}
}
static QDateTime maggeo_parsedate(char* dmy)
{
QString date(dmy);
- int d = date.mid(0,2).toInt();
- int m = date.mid(2,2).toInt();
- int y = date.mid(4,3).toInt();
+ int d = date.midRef(0,2).toInt();
+ int m = date.midRef(2,2).toInt();
+ int y = date.midRef(4,3).toInt();
QDateTime r(QDate(y + 1900, m, d));
return r;
}
wpt_tmp->longitude = lon;
wpt_tmp->latitude = lat;
} else {
- lat = tbuf.mid(1, -1).toDouble();
- lon = nbuf.mid(1, -1).toDouble();
+ lat = tbuf.midRef(1, -1).toDouble();
+ lon = nbuf.midRef(1, -1).toDouble();
if (tbuf[0] == 'S') {
lat = -lat;
}
wpt_tmp->longitude = lon;
wpt_tmp->latitude = lat;
} else {
- lat = tbuf.mid(1, -1).toDouble();
- lon = nbuf.mid(1, -1).toDouble();
+ lat = tbuf.midRef(1, -1).toDouble();
+ lon = nbuf.midRef(1, -1).toDouble();
if (tbuf[0] == 'S') {
lat = -lat;
}